﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;
using System.Web.Services;

namespace PropertyAppraisal.DoemsKanCha
{
    public partial class DomeIndoor : System.Web.UI.Page
    {

        
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 绑定房屋用途下拉框
        /// </summary>
        /// <returns></returns>
        public static string DictionaryBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(27);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }

        /// <summary>
        /// 绑定朝向下拉框
        /// </summary>
        /// <returns></returns>
        public static string NextBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(28);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }
        /// <summary>
        /// 绑定住宅类型下拉框
        /// </summary>
        /// <returns></returns>
        public static string HousTypeBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(29);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }
        /// <summary>
        /// 绑定客厅装修程度下拉框
        /// </summary>
        /// <returns></returns>
        public static string KeTingBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(30);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }
        /// <summary>
        /// 绑定居室装修程度下拉框
        /// </summary>
        /// <returns></returns>
        public static string JushiBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(36);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }
        /// <summary>
        /// 绑定卫生间装修程度下拉框
        /// </summary>
        /// <returns></returns>
        public static string WCBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(37);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }
        /// <summary>
        /// 绑定厨房装修程度下拉框
        /// </summary>
        /// <returns></returns>
        public static string ChuBD()
        {
            DictionaryBll Dictionarybll = new DictionaryBll();
            List<SysDictionary> Dictionary = Dictionarybll.sb(38);
            var HtmlStr = "";
            for (var i = 0; i < Dictionary.Count; i++)
            {
                HtmlStr += "<option value=\"" + Dictionary[i].dictionary_Type + "\">" + Dictionary[i].dictionary_Name + "</option>";
            }
            return HtmlStr;
        }

        /// <summary>
        /// 室内勘察添加 
        /// </summary>
        [WebMethod]
        public static bool DomeIndoorAdd(string projectNumber, int indoor_Purpose, int indoor_LayerNum
            , int indoor_Layer, int indoor_Orientation, int indoor_Residence,string indoor_Bedroom
            , string indoor_Hall, string indoor_Toilet, string indoor_Kitchen, string indoor_Balcony
            , string indoor_Terrace, string indoor_Yard, string  indoor_HallDegree, int indoor_RoomDegree
            , int indoor_ToiletDegree, int indoor_KitchenDegree , string indoor_Explain, string living_Wall
            , string living_Ceiling, string Living_Ground, string livingGround_Othe, string Room_Wall
            , string roomWall_Other, string room_Ceiling, string roomCeiling_Other, string room_Ground
            , string roomGround_Other, string toilet_Wall, string toiletWall_Other, string toilet_Ceiling
            , string toiletCeiling_Other, string toilet_Ground, string toiletGround_Other, string toilet_Sanitary
            , string toiletSanitary_Other, string kitchen_Wall, string kitchenWall_Other, string kitchen_Ceiling
            , string kitchenCeiling_Other, string kitchen_Ground, string kitchenGround_Other, string kitchen_Cooking
            , string kitchenCookingO_ther, string livingWall_Other, string livingCeiling_Other)
        {

            IndoorBll bll = new IndoorBll();  //实例化室内表bll
            EAIndoor indoor = new EAIndoor();
            indoor.projectNumber = projectNumber; //项目编号
            indoor.indoor_Purpose = indoor_Purpose; //房屋实际用途
            indoor.indoor_LayerNum = indoor_LayerNum; //总楼层
            indoor.indoor_Layer = indoor_Layer; //所在楼层
            indoor.indoor_Orientation = indoor_Orientation;  //朝向
            indoor.indoor_Residence = indoor_Residence;  //住宅类型
            indoor.indoor_Bedroom = indoor_Bedroom;  //卧室
            indoor.indoor_Hall = indoor_Hall;  //客厅
            indoor.indoor_Toilet = indoor_Toilet;  //卫生间
            indoor.indoor_Kitchen = indoor_Kitchen; //厨房
            indoor.indoor_Balcony = indoor_Balcony; //阳台
            indoor.indoor_Terrace = indoor_Terrace; //露台
            indoor.indoor_Yard = indoor_Yard;  //小院

            indoor.indoor_HallDegree = indoor_HallDegree;  //客厅装修程度
            indoor.indoor_RoomDegree = indoor_RoomDegree;  //居室装修程度
            indoor.indoor_ToiletDegree = indoor_ToiletDegree; //卫生间装修程度
            indoor.indoor_KitchenDegree = indoor_KitchenDegree; //厨房装修程度

            indoor.indoor_Explain = indoor_Explain;  //有关说明

            indoor.living_Wall = living_Wall; //客厅内墙
            indoor.livingWall_Other = livingWall_Other;
            indoor.living_Ceiling = living_Ceiling; //客厅顶棚
            indoor.livingCeiling_Other = livingCeiling_Other;
            indoor.living_Ground = Living_Ground;  //客厅地面
            indoor.livingGround_Other = livingGround_Othe;  //客厅地面其他

            indoor.room_Wall = Room_Wall;    //居室内墙
            indoor.roomWall_Other = roomWall_Other;  //居室内墙其他
            indoor.room_Ceiling = room_Ceiling;  //居室顶棚
            indoor.roomCeiling_Other = roomCeiling_Other;  //居室顶棚其他
            indoor.room_Ground = room_Ground;  //居室地面
            indoor.roomGround_Other = roomGround_Other; //居室地面其他

            indoor.toilet_Wall = toilet_Wall; //卫生间内墙
            indoor.toiletWall_Other = toiletWall_Other;//卫生间内墙其他
            indoor.toilet_Ceiling = toilet_Ceiling;  //卫生间顶棚
            indoor.toiletCeiling_Other = toiletCeiling_Other;  //卫生间顶棚其他
            indoor.toilet_Ground = toilet_Ground;  //卫生间地面
            indoor.toiletGround_Other = toiletGround_Other;//卫生间地面其他
            indoor.toilet_Sanitary = toilet_Sanitary;  //卫生间洁具情况
            indoor.toiletSanitary_Other = toiletSanitary_Other;  //卫生间洁具情况其他

            indoor.kitchen_Wall = kitchen_Wall;  //厨房内墙
            indoor.kitchenWall_Other = kitchenWall_Other; //厨房内墙其他
            indoor.kitchen_Ceiling = kitchen_Ceiling;  //厨房顶棚
            indoor.kitchenCeiling_Other = kitchenCeiling_Other;  //厨房顶棚其他
            indoor.kitchen_Ground = kitchen_Ground;  //厨房地面
            indoor.kitchenGround_Other = kitchenGround_Other;  //厨房地面其他
            indoor.kitchen_Cooking = kitchen_Cooking;  //厨房灶台情况
            indoor.kitchenCookingO_ther = kitchenCookingO_ther;  //厨房灶台情况其他

            if (bll.IndoorAdd(indoor))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}